#define DEBUG
#include <cstdio>
#define MAXN 54
#define MODS 998244353

using namespace std;

long long solve(int o, int n, int *x, int *y) {
  static int d[MAXN+1];
  const int dir[4][2] = {{-1, 0}, {0,-1}, {0, 1}, {1, 0}};

  if (o<=n) {
    for (int i=0; i<4; i++) {
      bool flag=true;
      for (int j=1; j<=n; j++) {
	int tx=x[j]-x[i], ty=y[j]-y[i];
	if ((tx==dir[i][0] && ty*dir[i][1]>0) || (ty==dir[i][1] && tx*dir[i][0]>0)) {
	  flag = false;
	  break;
	}
	
      }
    }
  } else {
    return 1;
  }
}

int main() {
#ifdef DEBUG
  freopen("2.in", "r", stdin);
  freopen("2.out", "w", stdout);
#endif

  static int x[MAXN+1], y[MAXN+1];
  int n;
  scanf("%d", &n);
  for (int i=1; i<=n; i++) {
    scanf("%d %d", x+i, y+i);
  }

  printf("%llu", solve(1, n, x, y));

  fcloseall();
  return 0;
}
